
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>接口文件 · classbro-u-center-web-v2.0</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Gj">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-tomorrow.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../index.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Icon.html" />
    
    
    <link rel="prev" href="Vuex.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    概要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="Utils.html">
            
                <a href="Utils.html">
            
                    
                    工具集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Config.html">
            
                <a href="Config.html">
            
                    
                    环境变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="I18n.html">
            
                <a href="I18n.html">
            
                    
                    国际化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="Interceptor.html">
            
                <a href="Interceptor.html">
            
                    
                    拦截器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="Vuex.html">
            
                <a href="Vuex.html">
            
                    
                    Vuex
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.7" data-path="Api.html">
            
                <a href="Api.html">
            
                    
                    接口文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="Icon.html">
            
                <a href="Icon.html">
            
                    
                    图标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="Xss.html">
            
                <a href="Xss.html">
            
                    
                    Xss
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="Permission.html">
            
                <a href="Permission.html">
            
                    
                    菜单&权限校验
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >接口文件</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x63A5;&#x53E3;&#x6587;&#x4EF6;">&#x63A5;&#x53E3;&#x6587;&#x4EF6;</h1>
<blockquote>
<p>&#x76EE;&#x5F55;&#x5730;&#x5740;&#xFF1A;src/api</p>
<p>&#x7ED3;&#x5408; src/utils/Request.js</p>
</blockquote>
<h4 id="&#x5EFA;&#x8BAE;">&#x5EFA;&#x8BAE;</h4>
<blockquote>
<p>&#x76EE;&#x524D;&#x9879;&#x76EE;&#x5927;&#x90E8;&#x5206;&#x63A5;&#x53E3;&#x90FD;&#x5199;&#x5728; <strong>daoBiApi.js</strong></p>
<p>&#x4E3A;&#x4E86;&#x907F;&#x514D;&#x6240;&#x6709;&#x529F;&#x80FD;&#x5199;&#x5728;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x91CC;&#xFF0C;<strong>&#x5EFA;&#x8BAE;</strong> <code>api</code>&#x6587;&#x4EF6;&#x547D;&#x540D;&#x6309;&#x7167;&#x529F;&#x80FD;&#x5206;&#x6A21;&#x5757;</p>
</blockquote>
<pre class="language-"><code class="lang-bash"><span class="token builtin class-name">.</span>
&#x251C;&#x2500;&#x2500; login.js
&#x251C;&#x2500;&#x2500; role.js
&#x2514;&#x2500;&#x2500; user.js
</code></pre>
<h4 id="&#x8BF7;&#x6C42;&#x793A;&#x4F8B;">&#x8BF7;&#x6C42;&#x793A;&#x4F8B;</h4>
<blockquote>
<p>&#x63A5;&#x53E3;&#x547D;&#x540D;&#x89C4;&#x8303;<code>&#x5C3D;&#x91CF;</code>&#x6309;&#x7167;<strong>&#x670D;&#x52A1;&#x7AEF;</strong>&#x63A5;&#x53E3;&#x6587;&#x6863;&#x5B9A;&#x4E49;&#x5199;&#xFF0C;&#x65B9;&#x4FBF;&#x6392;&#x67E5;&#x95EE;&#x9898;&#x63A5;&#x53E3;</p>
<p>&#x4F8B;&#x5982;&#xFF1A;<code>/account/v1/resetPassword</code> =&gt; <code>account_resetPassword</code> || <code>accountResetPassword</code></p>
</blockquote>
<pre class="language-"><code class="lang-javascript"><span class="token keyword">import</span> <span class="token punctuation">{</span> Prefix <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;config&quot;</span><span class="token punctuation">;</span>

<span class="token comment">/** &#x6A21;&#x62DF;Get */</span>
<span class="token keyword">export</span> <span class="token keyword">const</span> <span class="token function-variable function">auth_userInfo</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">params</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token function">request</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
        url<span class="token operator">:</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>Prefix<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">/auth/v1/userInfo</span><span class="token template-punctuation string">`</span></span><span class="token punctuation">,</span>
        method<span class="token operator">:</span> <span class="token string">&quot;GET&quot;</span><span class="token punctuation">,</span>
        params
    <span class="token punctuation">}</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>

<span class="token comment">/** &#x6A21;&#x62DF;Post */</span>
<span class="token keyword">export</span> <span class="token keyword">const</span> <span class="token function-variable function">auth_addUser</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token function">request</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
        url<span class="token operator">:</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>Prefix<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">/auth/v1/addUser</span><span class="token template-punctuation string">`</span></span><span class="token punctuation">,</span>
        method<span class="token operator">:</span> <span class="token string">&quot;POST&quot;</span><span class="token punctuation">,</span>
        data
    <span class="token punctuation">}</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>

<span class="token comment">/** &#x6A21;&#x62DF;Put */</span>
<span class="token keyword">export</span> <span class="token keyword">const</span> <span class="token function-variable function">auth_userUpdate</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token function">request</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
        url<span class="token operator">:</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>Prefix<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">/auth/v1/userUpdate</span><span class="token template-punctuation string">`</span></span><span class="token punctuation">,</span>
        method<span class="token operator">:</span> <span class="token string">&quot;PUT&quot;</span><span class="token punctuation">,</span>
        data
    <span class="token punctuation">}</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>

<span class="token comment">/** &#x6A21;&#x62DF;Delete */</span>
<span class="token keyword">export</span> <span class="token keyword">const</span> <span class="token function-variable function">auth_delUser</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">userId</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token function">request</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
        url<span class="token operator">:</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>Prefix<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">/auth/v1/</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>userId<span class="token interpolation-punctuation punctuation">}</span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">,</span>
        method<span class="token operator">:</span> <span class="token string">&quot;DELETE&quot;</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="Vuex.html" class="navigation navigation-prev " aria-label="Previous page: Vuex">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Icon.html" class="navigation navigation-next " aria-label="Next page: 图标">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"接口文件","level":"1.7","depth":1,"next":{"title":"图标","level":"1.8","depth":1,"path":"src/Icon.md","ref":"src/Icon.md","articles":[]},"previous":{"title":"Vuex","level":"1.6","depth":1,"path":"src/Vuex.md","ref":"src/Vuex.md","articles":[]},"dir":"ltr"},"config":{"plugins":["chapter-fold","-lunr","-search","search-pro","-highlight","prism","livereload"],"styles":{"website":"index.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-tomorrow.css"]},"chapter-fold":{},"search-pro":{},"livereload":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Gj","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"classbro-u-center-web-v2.0","language":"zh-hans","gitbook":"3.2.3","description":"u-center-web 项目迁移 重构"},"file":{"path":"src/Api.md","mtime":"2020-07-27T06:30:54.923Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-27T06:50:03.177Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

